package com.murray.assignment.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Murray
 * @Date 2021/6/8
 * @Time 19:22
 * @Description 统一异常处理功能类，用于处理异常
 */
@ControllerAdvice
public class UnifyExceptionHandler {
    @ExceptionHandler(Exception.class)
    @RequestMapping("/error")
    public String exceptionHandler() {
        return "error";
    }
}
